//枚举名和命名常量都是用首字母大写
enum FlexAlign{
    Left=10,
    Center=20,
    Right=11
}

let p:FlexAlign=FlexAlign.Center

//数字枚举会自动自增
console.log(FlexAlign.Left)//10

console.log(FlexAlign[10])//Left

console.log(FlexAlign.Center)//20

console.log(FlexAlign.Right)//11